using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Wicresoft.SelfService.DAO
{
    public class ServiceList
    {
        public int serviceTypeID { get; set; }
        [Display(Name = "选择分类")]
        [Required(ErrorMessage = "{0}为必填字段")]
        public string serviceName { get; set; }
        public int serviceID { get; set; }
        public byte needApprove { get; set; }
        public byte cp { get; set; }
        public byte isEvent { get; set; }
        public string applvl1 { get; set; }
        public string applvl2 { get; set; }
        public string applvl3 { get; set; }
        public string partialName { get; set; }
        public ServiceList parent { get; set; }
    }
    public class ApproveSteps
    {
        public int id { get; set; }
        public string stepName { get; set; }
        public string operation { get; set; }
        public string approver { get; set; }
        public ApproveRole approverRole { get; set; }
    }
    public class ApproveRole
    {
        public int id { get; set; }
        public string roleName { get; set; }
    }
   
    public class UserRoleRelationship
    {
        public int roleID { get; set; }
        public string accountID { get; set; }
        public UserInfo user { get; set; }
        public ApproveRole role { get; set; }
    }
    public class UserInfo
    {
        [Required(ErrorMessage = "{0}为必填字段")]
        [Display(Name = "账号")]
        public string accountID { get; set; }
        [Display(Name = "姓名")]
        [Required(ErrorMessage = "{0}为必填字段")]
        public string userName { get; set; }
        [Display(Name = "公司")]
        [Required(ErrorMessage = "{0}为必填字段")]
        public string company { get; set; }
        [Display(Name = "部门")]
        public string dept { get; set; }
        [Display(Name = "职位")]
        public string position { get; set; }
        [Display(Name = "电话")]
        //[Required(ErrorMessage = "{0}为必填字段")]
        public string phone { get; set; }
        [Display(Name = "邮箱")]
        //[Required(ErrorMessage = "{0}为必填字段")]
        //[RegularExpression(@"^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$", ErrorMessage = "{0}格式不正确")]
        public string email { get; set; }
        public string roleName { get; set; }
        [Display(Name = "行政区")]
        public string AdministrativeRegion { get; set; }
    }
    public class ServiceDetail
    {
        public int ID { get; set; }
        public string serviceRequestID { get; set; }
        public string flowInstanceId { get; set; }
        public string accountID { get; set; }
        public UserInfo account { get; set; }
        [Display(Name = "选择分类")]
        [Required(ErrorMessage = "{0}为必填字段")]
        public int serviceTypeID { get; set; }
        public ServiceList serviceType { get; set; }
        [Display(Name = "系统分类(一级)")]
        public string appCategory { get; set; }
        [Display(Name = "系统分类(二级)")]
        public string appName { get; set; }
        [Display(Name = "计算机名")]
        public string computerName { get; set; }
        [Display(Name = "IP地址")]
        public string ipAdress { get; set; }
        [Display(Name = "操作系统")]
        public string os { get; set; }
        [Display(Name = "物理地址")]
        public string mac { get; set; }
        [Display(Name = "浏览器")]
        public string browser { get; set; }
        [Display(Name = "请求描述")]
        [Required(ErrorMessage = "{0}为必填字段")]
        [StringLength(200, ErrorMessage = "{0}最多可以输入200个字")]
        public string description { get; set; }
        [Display(Name = "故障摘要")]
        [Required(ErrorMessage = "{0}为必填字段")]
        [StringLength(30, ErrorMessage = "{0}最多可以输入30个字")]
        public string BDSummary { get; set; }
        [Display(Name = "故障描述")]
        [Required(ErrorMessage = "{0}为必填字段")]
        [StringLength(200, ErrorMessage = "{0}最多可以输入200个字")]
        public string BDDescription { get; set; }
        public DateTime createTime { get; set; }
        public Nullable<DateTime> updateTime { get; set; }
        public int stauts { get; set; }
        public Nullable<int> stepID { get; set; }
        public ApproveSteps step { get; set; }
        public string approveGroup { get; set; }
        public string approveOwner { get; set; }
        public string companyIDs { get; set; }
        [Display(Name = "故障分类(一级)")]
        public string breakDownlvl1 { get; set; }
        [Display(Name = "故障分类(二级)")]
        public string breakDownlvl2 { get; set; }
        [Display(Name = "故障分类(三级)")]
        public string breakDownlvl3 { get; set; }
        [Display(Name = "事件单号")]
        public string IncidentNumber { get; set; }
        public List<Attachment> attachments { get; set; }
        public List<ServiceHistory> histories { get; set; }
        public bool disabled { get; set; }
        public IList<actionType> actions { get; set; }

        //提交方式，存储在内存中，非数据库字段存储。1-自服务提交，2-ITSM提交
        public int SubmitType { get; set; }
        //该属性用于页面展示当前处理人，非数据库字段存储
        public string CurrentProcessor { get; set; }
        public string LastProcessor { get; set; }
        public Nullable<DateTime> LastProcessTime { get; set; }
        [Display(Name = "行政区")]
        public string AdministrativeRegion { get; set; }
    }
    public class ServiceHistory
    {
        public string serviceRequestID { get; set; }
        public string approverID { get; set; }
        public string approverName { get; set; }
        public UserInfo approver { get; set; }
        public string action { get; set; }
        public string comments { get; set; }
        public DateTime approveDate { get; set; }
    }
    public class Attachment
    {
        public int ID { get; set; }
        public string fileName { get; set; }
        public string fileSize { get; set; }
        public DateTime uploadDate { get; set; }
        public string committerID { get; set; }
        public string committerUserName { get; set; }
        public string serviceRequestID { get; set; }
    }
    public class BreakDown
    {
        public int id { get; set; }
        [Required(ErrorMessage = "{0}为必填字段")]
        [Display(Name = "故障分类(一级)")]
        public List<BreakDownList> lvl1 { get; set; }
        [Display(Name = "故障分类(二级)")]
        public List<BreakDownList> lvl2 { get; set; }
        [Display(Name = "故障分类(三级)")]
        public List<BreakDownList> lvl3 { get; set; }
    }
    public class BreakDownList
    {
        public int ID { get; set; }
        public string LvlName { get; set; }
        public int parentID { get; set; }
        public BreakDownList parent { get; set; }
    }
    public class BusinessSystem
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public string Company { get; set; }
        public string category { get; set; }
        public int isUnified { get; set; }
    }
    public class LogOnModel
    {
        [Required(ErrorMessage = "请填写{0}")]
        [Display(Name = "用户名")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "请填写{0}")]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Password { get; set; }

        [Display(Name = "下次自动登录")]
        public bool RememberMe { get; set; }
    }
    public class RolesConfig
    {
        public string accountID { get; set; }
        public string userName { get; set; }
        public string isAdmin { get; set; }
        public string roleName { get; set; }
        public string company { get; set; }
    }

    //新增
    public class ClassifyConfig
    {
        public int ID{ get; set; }
        public int ServiceID{ get; set; }
        public string  ServiceName{ get; set; }
        public string  Applvl1{ get; set; }
        public string  Applvl2{ get; set; }
        public string  Applvl3 { get; set; }
        public string  PartialName{ get; set; }
        public int Needapprove { get; set; }
        public int CP{ get; set; }
        public int Isevent{ get; set; }

    }

    public class BreakDowmModel 
    {
        public int Tier1ID { get; set; }
        public string Tier1 { get; set; }
        public int Tier2ID { get; set; }
        public string Tier2 { get; set; }
        public int Tier3ID { get; set; }
        public string Tier3 { get; set; }
    }

    public class BreakConfig 
    {
        public int ID{ get; set; }
        public int Parentid { get; set; }
        public string  LvlName{ get; set; }
    }

    public class EventType 
    {
        public string Request_id { get; set; }
        public string Submitter { get; set; }
        public string Create_Date { get; set; }
        public string Assigned_To { get; set; }
        public string Last_Modified_By { get; set; }
        public string Modified_Date { get; set; }
        public int Status { get; set; }
        public string Short_Description { get; set; }
        public string Dynamic_Company { get; set; }
        public string Tier1 { get; set; }
        public string Tier2 { get; set; }
        public string Tier3 { get; set; }
        public string Event_properties { get; set; }
        public string Tier2IsDefault { get; set; }
        public string Cint_Disabled { get; set; }
        public string Tier3IsDefault { get; set; }
    }

    public class OS
    {
        public decimal ID { get; set; }
        public string OSName { get; set; }
    }


}

